{% load static %}
{% load erpdata %}
<script language="javascript">
	function checkall(chk){
		{% for item in STATUS_CHOICES %}
		document.getElementById('choice_{{forloop.counter}}').checked=document.getElementById('choice_ALL').checked;
		{% endfor %}		
	}
	function togglecheckall(chk){
		{% for item in STATUS_CHOICES %}
		var c_{{forloop.counter}} = document.getElementById('choice_{{forloop.counter}}').checked;		
		{% endfor %}
		document.getElementById('choice_ALL').checked = true {% for item in STATUS_CHOICES %} && c_{{forloop.counter}}{% endfor %};		
	}
	window.onload=togglecheckall;
</script>
<link type="text/css" rel="stylesheet" href="{% get_static_prefix%}calendar/dhtmlgoodies_calendar.css?random=20057712" media="screen"></LINK> 
<SCRIPT type="text/javascript" src="{%get_static_prefix%}calendar/dhtmlgoodies_calendar.js?random=2860118"></script> 
<div class="box_i " >
	<div class="box_o " >
		<div class="rr_1">
		</div>
		<div class="rr_2">
		</div>
		<div class="rr_3">
		</div>
		<div class="rr">
			<h4>
			过滤： 
			<a href="javascript:toggleLayer('pr_help');" class="fright">帮助</a>
			</h4>			
			<div class="box_i " >
				<div id="pr_help" style="display:none;">
					<h4>流程说明</h4>
					<hr>
					<img  src="{% get_static_prefix %}workflow/{{workflow_png}}" />
					<hr>
				</div>
				<div>
					<form method="post">
						{% csrf_token %}
						   <span style="float:left;">流程状态： </span>
							<label class="ss" for="choice_ALL">								
								<input id="choice_ALL" name='STATUS_CHOICES_ALL'
								{%if not STATUS_CHOICES_NOT_ALL %} checked {% endif %}
								type="checkbox" onclick="checkall(this);" value='1' />
								全部
							</label>
							{% for item in STATUS_CHOICES %}
							<label class="ss" for="choice_{{forloop.counter}}">								
								<input id="choice_{{forloop.counter}}" name='STATUS_CHOICES'
								{%if item.0 in STATUS_CHOICES_POST %} checked {% endif %}
								type="checkbox" value='{{ item.0 }}' onclick="togglecheckall(this);" />
								{{ item.1 }}
							</label>
							{% endfor %}
						<br/><br/>开始时间：<input id="begintime" name="begintime" value="{{ begintime }}">
						<input type="button" class="p" value="选择" onclick="displayCalendar(document.getElementById('begintime'),'yyyy-mm-dd',this)">
						结束时间：<input id="endtime" name="endtime" value="{{ endtime}}">
						 <input type="button" class="p" value="选择" onclick="displayCalendar(document.getElementById('endtime'),'yyyy-mm-dd',this)">
						<br/><br/>标题查询：<input id="keywords" name="keywords" value="{{ keywords }}">
							<input type="submit"  value="&nbsp;&nbsp;&nbsp;查询&nbsp;&nbsp;&nbsp;">

						
						<br/>
					</form>
				</div>
			</div>
			<h4></h4>
		</div>
		<div class="rr_4">
		</div>
		<div class="rr_5">
		</div>
		<div class="rr_1">
		</div>
	</div>
</div>